package com.blt.govdata.utils;

import com.google.common.collect.Maps;

import java.util.Map;

/**
 * Created by sungang on 2016/12/26.
 */
public class DepCount {

    public static final ThreadLocal<Integer> DEP_COUNT = new ThreadLocal<>();
    private static DepCount instance = null;
    public final Map<String, Integer> depCountMap = Maps.newConcurrentMap();

    private DepCount() {
    }

    //静态工厂方法
    public static DepCount getInstance() {
        if (instance == null) {
            instance = new DepCount();
        }
        return instance;
    }


    public Integer get(String key) {
        return depCountMap.get(key);
    }

    public void set(String key, Integer value) {
        depCountMap.put(key, value);
    }
}
